﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FrogEngine
{
	public class ParticleService : GameEntityServiceBase<IParticleSystem>
	{
		public ParticleService(IEngine engine)
			: base(engine)
		{

		}

		public override bool Subscribe(IGameEntity entity)
		{
			return base.Subscribe(entity);
		}

		public override bool Unsubscribe(IGameEntity entity)
		{
			return base.Unsubscribe(entity);
		}

		public S GetParticleSystem<S>()
		{
			return (S)subscribedEntities.Single(a => a is S);
		}
	}
}
